<%@page import="java.util.Iterator"%>
<%@page import="net.groupme.model.Group"%>
<%@page import="net.groupme.gui.constants.VIEW_VOCABULARY"%>
<%@page import="java.util.Collection"%>
<%@page import="net.groupme.model.Tag"%>
<%@page import="net.groupme.model.MODEL_CONSTANTS"%>
<%		if(it.hasNext()){
		String tmpKeywordDelimeter = "";
		String keyword = null;
		while (it.hasNext()){
			keyword = null;
			Group actualGroup = (Group) it.next(); 
			if(!MODEL_CONSTANTS.RESOURCE_TYPE_QUEUE.equals(actualGroup.getType())){%>

<div class="groupWithinGroupList">
			<strong>
				<a href="<%= VIEW_VOCABULARY.RESTful_GROUP_URI_PATTERN +  actualGroup.getId() %>"><%= actualGroup.getName() %></a>
			</strong>
			<br/>
			<%= actualGroup.getDescription() %><br/>  
			<% //List tags:
			Collection<Tag> tags = actualGroup.getTags(); 
			Iterator<Tag> tagIterator = tags.iterator();
			if(tagIterator.hasNext()){%>
				<small><strong>tags:</strong>
			<%
			}
			while(tagIterator.hasNext()){
				Tag tag = tagIterator.next();
				if(tag.getKeyword().contains(" ")){
					tmpKeywordDelimeter = "%22";
				}else{
					tmpKeywordDelimeter = "";
				}
				keyword = tag.getKeyword();
				%>
				<a href="<%= request.getContextPath() +"/" + VIEW_VOCABULARY.ACTION_HOME + "?" + VIEW_VOCABULARY.PARAMETER_MYHOME_VIEW + "=" + VIEW_VOCABULARY.VIEW_SEARCH + "&" + VIEW_VOCABULARY.PARAMETER_KEYWORD + "=" + tmpKeywordDelimeter + tag.getKeyword() + tmpKeywordDelimeter %>" title="List your Groups and Resources tagged with <%= keyword %>"><%= keyword %></a><%if(tagIterator.hasNext()){%><%= ", " %>
				<%}
			}
			if(keyword != null){%>
			</small>
			<br/>
			<%} 
			if(it.hasNext()){ %>
				<hr/>
			<% } %>
			
			</div>
		<%	} //end of "if queue"
		}//end of while 
		}//end of other if%>